{extend name="index/index"}

{block name="main"}

<div class="tpl-content-wrapper">
    <div class="tpl-content-page-title">
        QBQ 房源信息审核列表
    </div>
    <ol class="am-breadcrumb">
        <li><a href="{:url('admin/index/index')}" class="am-icon-home">首页</a></li>
        <li class="am-active">房源信息审核</li>
        <li class="am-active">房源信息审核列表</li>
    </ol>
    <div class="tpl-portlet-components">
        <div class="portlet-title">
            <div class="caption font-green bold">
                <span class="am-icon-code"></span> 房源信息审核列表
            </div>
            <div class="tpl-portlet-input tpl-fz-ml">
                <div class="portlet-input input-small input-inline">
                    <form action="{:url('admin/review/doSearch')}" method="post">
                        <div class="input-icon right">
                            <i class="am-icon-search"></i>
                            <input type="text" class="form-control form-control-solid" name="search" placeholder="请输入搜索条件">
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="tpl-block">
            <div class="am-g">
                <div class="am-u-sm-12">
                    <table class="am-table am-table-striped am-table-hover table-main">
                        <thead>
                        <tr>
                            <th class="table-id">ID</th>
                            <th class="table-title">ADDRESS</th>
                            <th class="table-type">RENT(单位:元)</th>
                            <th class="table-title">NAME</th>
                            <th class="table-author am-hide-sm-only">审核</th>
                            <th class="table-set">操作</th>
                        </tr>
                        </thead>
                        {if condition="$data === null"}
                        <tr>
                            <td><h1>查无数据!</h1></td>
                        </tr>
                        {else /}
                        <tbody>
                        {volist name="data" key="k" id="v"}
                        <tr>
                            <td>{$v['id']}</td>
                            <td>{$v['address']}</td>
                            <td>{$v['rent']}</td>
                            <td>{$v['name']}</td>
                            <td class="review" data-id="{$v['id']}" data-status="{$v['review']}" style="color: #0ca3ea;cursor:pointer;">
                                {switch name="v['review']"}
                                {case value="1"}通过{/case}
                                {case value="2"}未通过{/case}
                                {/switch}
                            </td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <a href="{:url('admin/review/edit',['id'=>$v['id']])}" class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 编辑</a>
                                        <a href="{:url('admin/review/read',['id'=>$v['id']])}" class="am-btn am-btn-default am-btn-xs am-text-secondary"><span class="am-icon-pencil-square-o"></span> 查看详情</a>
                                        <button class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only del-btn" data-id="{$v['id']}"><span class="am-icon-trash-o"></span> 删除</button>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                        {/if}
                    </table>
                    <div class="am-cf">

                        <div class="am-fr">
                            {$page}
                        </div>

                    </div>
                    <hr>
                </div>
            </div>
        </div>
        <div class="tpl-alert"></div>
    </div>

    <!--模态框-->
    <div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">删除房源</div>
            <div class="am-modal-bd">
                你，确定要删除这个房源吗？
            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn" data-am-modal-cancel>取消</span>
                <span class="am-modal-btn" data-am-modal-confirm>确定</span>
            </div>
        </div>
    </div>

    <script src="/static/admin/assets/js/jquery.min.js"></script>
    <script src="/static/admin/assets/js/amazeui.min.js"></script>
    <script src="/static/admin/assets/js/review.js"></script>
    {/block}

</div>
